<template>
  <a-form layout="vertical" :form="form">
    <a-form-item label="请输入填写课程简介">
<!--      <a-textarea :rows="10" v-decorator="[
        'kcjj',
        {
          rules: [{
            required: true, message: '课程简介必填'
          }, {
            validator: checkLength
          }],
        }
      ]"/>-->
      <a-textarea :rows="10" v-decorator="[
        'kcjj'
      ]"/>
    </a-form-item>
  </a-form>
</template>

<script>
export default {
  beforeCreate () {
    this.form = this.$form.createForm(this)
  },
  methods: {
    checkLength  (rule, value, callback) {
      if (!value || value.length < 50) {
        callback(new Error('字数不得小于50字!'))
      } else {
        callback()
      }
    }
  }
}
</script>

<style>

</style>
